//
//  ImportNewsModel.m
//  NeteaseNewsLY
//
//  Created by dllo on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ImportNewsModel.h"

@implementation ImportNewsModel
- (void)dealloc
{
    [_imgsrc release];
    [_title release];
    [_digest release];
    [_replyCount release];
    [_imgextra release];
    [_url release];
    [_hasHead release];
    [_url_3w release];
    [super dealloc];
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    // super调用父类方法 否则不执行
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"imgextra"]) {
//        [self.imgextra addObject:_pictureDic[@"imgsrc"]];
//        self.imgextra = value[@"imgsrc"];
//        self.arr =  self.imgextra[@"imgsrc"];
        // 临时数组保存imgextra中的值
        NSArray *arr = [NSArray arrayWithArray:self.imgextra];
        // 初始化 置为空
        self.imgextra = [NSMutableArray array];
        // 遍历临时数组
        for (NSDictionary *dic in arr) {
            // 取字典中value值放在空的imgextra中
            [_imgextra addObject:dic[@"imgsrc"]];
        }
//        self.imgextra = value[@"imgsrc"];
        
    }
}
@end
